package com.petcommunity.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DBUtil {
//    private static final String URL = "jdbc:postgresql://1.92.126.102:26000/pet_community?useUnicode=true&characterEncoding=UTF-8";
//    private static final String USER = "joe";
//    private static final String PASSWORD = "Alex@1234";


//    private static final String URL = "jdbc:postgresql://192.168.44.138:26000/pet_community?useUnicode=true&characterEncoding=UTF-8";
//    private static final String USER = "sys1";
//    private static final String PASSWORD = "Bigdata@123";


    private static final String URL = "jdbc:postgresql://124.70.83.54:26000/postgres?useUnicode=true&characterEncoding=UTF-8&currentSchema=root";
    private static final String USER = "root";
    private static final String PASSWORD = "Web319319";

    static {
        try {
            Class.forName("org.postgresql.Driver");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }

    public static Connection getConnection() throws SQLException {
        return DriverManager.getConnection(URL, USER, PASSWORD);
    }
}
